package com.cf.oss;


import com.cf.oss.core.OSSConfig;
import com.cf.oss.core.OSSService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;

/**
 * game-server-OssConfig
 *
 * @author <a href="2428922347@qq.com">Zhu mingming</a>
 * @info
 * @since 2018/6/5 下午 12:09
 */
@Slf4j
@EnableConfigurationProperties(OSSConfig.class)
public class OssConfig {

    @Autowired
    private OSSConfig ossConfig;

    @Bean(name = "ossService")
    public OSSService ossService() {
        log.info("实例化OSSService");
        OSSService ossService = new OSSService(ossConfig);
        return ossService;
    }
}
